﻿#ifndef DRAW_PIX_H
#define DRAW_PIX_H

#include <QWidget>
#include <QPainter>
#include <QPushButton>
#include <QDebug>
#include <QMouseEvent>
#include "PatternStore.h"
#pragma execution_character_set("utf-8")

namespace Ui {
class draw_pix;
}

class draw_pix : public QWidget
{
    Q_OBJECT

public:
    explicit draw_pix(QWidget *parent = nullptr);
    void updacanvasPixmap(patternstore *all_store);   //旋转矩阵

    void paintEvent(QPaintEvent *e);
    void mousePressEvent(QMouseEvent *event);

    ~draw_pix();

private:
    Ui::draw_pix *ui;
    int flag = 0;    //记鼠标是否点中，1点中，0没点中
    int text_point;   //选中的文字编号

    QPixmap m_pixmap;			// 弧形图像
    QString m_text;				// 弧形文本
    QPixmap m_canvas_pixmap;     //画布的图案
    patternstore *d_all_store;


    int m_radius;    //弧形半径
    int m_fontsize = 12;  //文本字体大小
    int m_angle;    //文本旋转角度
//    QPixmap pixmap;

};

#endif // DRAW_PIX_H
